package com.lxw.oa.service.serviceImpl;

import com.lxw.oa.mapper.RoleMapper;
import com.lxw.oa.mapper.StuMapper;
import com.lxw.oa.service.StuSurveyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Transactional
@Service(value = "stuSurveyService")
public class StuSurveyServiceImpl implements StuSurveyService {

    @Autowired
    private StuMapper stuMapper;



    @Override
    public List<Map<String, String>> getClubs() {
        return stuMapper.getClubs();
    }

    @Override
    public List<Map<String, String>> getTYList() {
        return  stuMapper.getTYList();
    }

    @Override
    public List<Map<String, String>> getWXList() {
        return  stuMapper.getWXList();
    }

    @Override
    public List<Map<String, String>> getSJList() {
        return  stuMapper.getSJList();
    }

    @Override
    public List ifSubmit(String loginName) {
        return stuMapper.ifSubmit(loginName);
    }

    @Override
    public void addStuCount(String loginName, String stuCount) {
        Map<String,String>map= new HashMap<String,String>();
        map.put("loginName",loginName);
        map.put("stuCount",stuCount);
        stuMapper.addStuCount(map);
    }

    @Override
    public void addClubs(List<Map<String, String>> clubChose) {
        for(Map<String, String> map:clubChose){
            stuMapper.addClub(map);
        }


    }

    @Override
    public void addList(List<Map<String, String>> list) {
        for(Map<String, String> map:list){
            stuMapper.addRadio(map);
        }
    }

    @Override
    public List<String> getXymcAll() {
        return stuMapper.getXymcAll();
    }

    @Override
    public List<Map<String, String>> getbadReason(String name) {
        return stuMapper.getbadReason(name);
    }

    @Override
    public List<String> getzlmcAll() {
        return stuMapper.getzlmcAll();
    }

}
